<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="${(introspectedTable.tableConfiguration.properties.fileDirectoryMapper)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryMapper)?index_of("/src/main/java/")+15))?replace("/",".")}.${className}Mapper">

    <#--生成主键排在第一位，非主键排在后面，这里缩为一行是为了避免替换之后出现换行问题-->
<#--    <resultMap id="BaseResultMap" type="${(introspectedTable.tableConfiguration.properties.fileDirectoryDO)?substring(((introspectedTable.tableConfiguration.properties.fileDirectoryDO)?index_of("/src/main/java/")+15))?replace("/",".")}.${className}DO"><!--表【${introspectedTable.tableConfiguration.schema!}.${introspectedTable.fullyQualifiedTable.introspectedTableName}】字段映射 &ndash;&gt;
        <#list introspectedTable.primaryKeyColumns as primaryKey><id column="${primaryKey.actualColumnName}" jdbcType="${primaryKey.jdbcTypeName}" property="${primaryKey.javaProperty}" /></#list>
        <#list introspectedTable.nonPrimaryKeyColumns as baseColumns><result column="${baseColumns.actualColumnName}" jdbcType="${baseColumns.jdbcTypeName}" property="${baseColumns.javaProperty}" /></#list>
    </resultMap>-->

    <sql id="Base_Column_List">
        <#list introspectedTable.allColumns as allColumns>${allColumns.actualColumnName}<#if allColumns_has_next>,</#if></#list>
    </sql>

    <sql id="Base_Column_List_With_Table">
        <#list introspectedTable.allColumns as allColumns><#assign easyTableName="" /><#list introspectedTable.fullyQualifiedTable.introspectedTableName?split("_") as splitStr><#assign easyTableName=easyTableName+(splitStr?substring(0,1)) /></#list><#if easyTableName=="to">too<#else>${easyTableName}</#if>.${allColumns.actualColumnName}<#if allColumns_has_next>,</#if></#list>
    </sql>

</mapper>
